home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- //
- // Creation Date: May 27, 1997
- // Author: sw
- //
- // Procedure Name:
- // AEspringTemplate
- //
- // Description Name;
- // Creates the attribute editor controls for spring Node
- //
- // Input Value:
- // nodeName
- //
- // Output Value:
- // None
- //
-
- global proc AEperSpringNew ( string $nodeAttr)
- {
- setUITemplate -pst attributeEditorTemplate;
-
- rowLayout -nc 1;
- button -l "Component Editor" dynSpringCompEd;
- setParent ..;
-
- setUITemplate -ppt;
-
- AEperSpringReplace($nodeAttr);
- }
-
- global proc AEperSpringReplace ( string $nodeAttr )
- {
- // $nodeAttr = nodeName.attrName.
- //
- string $names[];
- tokenize($nodeAttr, ".", $names);
-
- // Set the per spring button callbacks.
- //
- button -e
- -c "componentEditorWindow"
- dynSpringCompEd;
- }
-
- //
- // Procedure Name:
- // AEspringTemplate
- //
-
- global proc AEspringTemplate ( string $nodeName )
- {
- editorTemplate -beginScrollLayout;
- editorTemplate -beginLayout "Spring Attributes" -collapse 0;
- editorTemplate -beginNoOptimize;
- editorTemplate -l "Per-spring Stiffness" -addControl "useStiffnessPS";
- editorTemplate -l "Per-spring Damping" -addControl "useDampingPS";
- editorTemplate -l "Per-spring Rest Length" -addControl "useRestLengthPS";
- editorTemplate -endNoOptimize;
-
- editorTemplate -addControl "stiffness";
- editorTemplate -addControl "damping";
- editorTemplate -addControl "restLength";
- editorTemplate -addControl "end1Weight";
- editorTemplate -addControl "end2Weight";
- editorTemplate -addControl "count";
- editorTemplate -addControl "manageParticleDeath";
-
- editorTemplate -suppress "objectPositions";
- editorTemplate -suppress "objectVelocities";
- editorTemplate -suppress "objectMass";
- editorTemplate -suppress "deltaTime";
- editorTemplate -endLayout;
-
- editorTemplate -beginLayout "Per Spring (Array) Attributes" -collapse false;
- editorTemplate -callCustom
- "AEperSpringNew"
- "AEperSpringReplace"
- "stiffnessPS";
-
- editorTemplate -suppress "stiffnessPS";
- editorTemplate -suppress "dampingPS";
- editorTemplate -suppress "restLengthPS";
-
- editorTemplate -endLayout;
-
- // include/call base class/node attributes
- //
- AEshapeTemplate $nodeName;
-
- editorTemplate -addExtraControls;
- editorTemplate -endScrollLayout;
-
- }
-
-